package com.yoyo.itravel.dao;

import org.apache.ibatis.annotations.*;
import org.springframework.stereotype.Repository;

import java.sql.SQLException;

/**
 * @author liuchaojie
 * @version 1.0
 * @Description 旅客和机票关联接口【持久层】
 * @date 2020/6/18 15:02
 */
@Repository
public interface ITravellerInfoFlightOrderDao {
    /**
     * 插入
     *
     * @param orderId
     * @param travellerId
     * @return
     * @throws SQLException
     */
    @Insert("insert into middle_tb_traveller_info_flight_order(orderId, travellerId) values(#{orderId},#{travellerId})")
    int insert(@Param("orderId") String orderId, @Param("travellerId") String travellerId) throws SQLException;

    /**
     * 根据id删除
     *
     * @param orderId
     * @param travellerId
     * @return
     * @throws SQLException
     */
    @Delete("delete from middle_tb_traveller_info_flight_order where orderId=#{orderId} and travellerId=#{travellerId}")
    int delete(@Param("orderId") String orderId, @Param("travellerId") String travellerId) throws SQLException;
}
